<template>
  <div class='follow-company'>
    <!-- 顶部导航 -->
    <div class="nav">
      <div class="top">
        <span
          class="left"
          @click="$router.back()"
        >
          <van-icon name="arrow-left" />
        </span>
        <span class="left-1">我的关注</span>
        <span class="right"></span>
      </div>
      <div class="bottom">
        <span
          :class="{'active':indexTap == index}"
          v-for="(item, index) in lists"
          :key="index"
          @click="indexTap = index"
        >{{item}}</span>
      </div>
    </div>
    <!-- 家政人员 -->
    <house-keeper v-if="indexTap==1" />
    <!-- 家政公司 -->
    <domestic-companies v-else />
  </div>
</template>

<script>
// import { getCompany, getPersonnel } from '@/api/home.js'
import DomesticCompanies from './my-concerns/domestic-companies'
import HouseKeeper from './my-concerns/house-keeper'
export default {
  name: 'FollowCompany',
  data () {
    return {
      indexTap: '',
      lists: ['家政公司', '家政人员'],
      // 请求的家政公司数据
      companyList: [],
      // 请求的家政人员数据
      personnelList: []
    }
  },
  props: {

  },
  watch: {

  },
  components: {
    DomesticCompanies,
    HouseKeeper
  },
  created () {
    // this.onLode()
  },
  mounted () {

  },
  methods: {
  }
}
</script>

<style scoped lang="less">
.follow-company {
  padding-top: 192px;
  .nav {
    position: fixed;
    z-index: 999;
    width: 100%;
    top: 0;
    height: 192px;
    line-height: 40px;
    background-color: rgba(63, 81, 181, 100);
    color: #fff;
    font-size: 28px;
    text-align: center;
    font-family: Arial;
    .top {
      .left {
        .van-icon {
          position: absolute;
          width: 36px;
          height: 36px;
          top: 42px;
          left: 26px;
        }
      }
      .left-1 {
        position: absolute;
        width: 128px;
        height: 44px;
        top: 34px;
        left: 72px;
        font-size: 32px;
      }
    }
    .bottom {
      display: flex;
      justify-content: space-between;
      width: 432px;
      height: 40px;
      margin: 126px auto 0;
      font-size: 28px;
    }
    .Highlight {
      display: flex;
      justify-content: space-between;
      width: 432px;
      height: 10px;
      margin: 0 auto;
      font-size: 28px;
    }
  }
  .active {
    border-bottom: 1px solid #fff;
  }
}
</style>
